﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Internal.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<%@ Import Namespace="Webdiyer.WebControls.Mvc" %>
<%@ Import Namespace="BPM.Entity" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    待审核进货单列表
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptStyleContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%
        var list = ViewData["list"] as Webdiyer.WebControls.Mvc.PagedList<BPM.Entity.PurchaseOrder>;
    %>
    <% if (list != null && list.Count > 0)
       { %>
    <table class="altTable" cellpadding="0" cellspacing="0">
        <thead>
            <tr>
                <td>
                    进货单条码
                </td>
                <td>
                    提交时间
                </td>
                <td>
                    创建人
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
        </thead>
        <tbody>
            <% foreach (var item in list)
               { %>
            <tr>
                <td>
                    <%= item.Barcode.Number %>
                </td>
                <td>
                    <%= item.CreatedTime.ToShortDateString() %>
                </td>
                <td>
                    <%= item.Creator.RealName %>
                </td>
                <td>
                    <%= Html.ActionLink("查看",BPM.AD.Singleton.PurchaseOrder.ViewPendingPurchaseOrder, new { id = item.Id })%>
                </td>
            </tr>
            <%} %>
        </tbody>
    </table>
    <%}
       else
       { %>
    <p>
        没有待审核的进货单!
    </p>
    <%} %>
    <%=
        Html.Pager(list, new PagerOptions
                {
                    PageIndexParameterName = "pageIndex",
                    FirstPageText = "首页",
                    LastPageText="尾页", 
                    NextPageText="下页", 
                    PrevPageText="上页"
                }
        ) 
    %>
</asp:Content>
